const {
  DataTypes
} = require('sequelize');
module.exports = sequelize => {
  const attributes = {
    id: {
      type: DataTypes.INTEGER(10).UNSIGNED,
      allowNull: false,
      defaultValue: null,
      primaryKey: true,
      autoIncrement: true,
      comment: "自增id",
      field: "id"
    },
    pay_log_id: {
      type: DataTypes.INTEGER(10).UNSIGNED,
      allowNull: false,
      defaultValue: "0",
      primaryKey: false,
      autoIncrement: false,
      comment: "支付日志id",
      field: "pay_log_id"
    },
    business_id: {
      type: DataTypes.INTEGER(10).UNSIGNED,
      allowNull: false,
      defaultValue: "0",
      primaryKey: false,
      autoIncrement: false,
      comment: "业务订单id",
      field: "business_id"
    },
    business_no: {
      type: DataTypes.CHAR(60),
      allowNull: false,
      defaultValue: "",
      primaryKey: false,
      autoIncrement: false,
      comment: "业务订单号",
      field: "business_no"
    },
    add_time: {
      type: DataTypes.INTEGER(10).UNSIGNED,
      allowNull: false,
      defaultValue: "0",
      primaryKey: false,
      autoIncrement: false,
      comment: "添加时间",
      field: "add_time"
    }
  };
  const options = {
    tableName: "sxo_pay_log_value",
    comment: "",
    indexes: [{
      name: "pay_log_id",
      unique: false,
      type: "BTREE",
      fields: ["pay_log_id"]
    }, {
      name: "business_id",
      unique: false,
      type: "BTREE",
      fields: ["business_id"]
    }, {
      name: "add_time",
      unique: false,
      type: "BTREE",
      fields: ["add_time"]
    }]
  };
  const SxoPayLogValueModel = sequelize.define("sxo_pay_log_value_model", attributes, options);
  return SxoPayLogValueModel;
};